
using System.Collections;
using System.Collections.Generic;

namespace QuantumEngine
{
   
    public class GameManager 
    {

        public GameObj ActiveQuest = null;
        public GameObj ActiveElement = null;
        public static bool LockInput = false;


        public string CineName;

        public bool CinePlaying;
        public static GameManager Active;
        public GameObj PlayerActor;
        public List<GameObj> StartUpEvents;
        public List<GameObj> Conditions;
        public GameObj BaseTemplate;

        public GameObj NaviRoot;
        public GameObj ActorRoot;
        public List<GameObj> ActorsList;

        public GameObj[] AllCams;
        public GameObj QuestRoot;
        public GameObj CineRoot;

        public GameObj CurCine;
        public int CineIndex = 0;
        public bool CineSubBegun = false;
      

      
        public float FadeTime = 0.0f;
        public float FadeStart = 0.0f;

        public List<GameObj> RunningQuests = new List<GameObj>();

        public static void StartManager()
        {
            Active = new GameManager();
        }
        public enum EventType
        {
            AcquiredItem, LostItem, FoundActor, LostActor, ActorDisabled, ActorEnabled
        }



        private bool mCreateQuest = false;

        public static void CreateQuest()
        {
         
        }




        public static void SetCine(GameObj b)
        {

            Active.CurCine = b;
            Active.CineIndex = 0;
            Active.CineSubBegun = false;

        }

        public static void RegisterQuest(GameObj q)
        {

            Active.RunningQuests.Add(q);

        }

        public static void ProcessEvent(EventType e, params GameObj[] a)
        {

            DoEvents(e, a);

        }
        public static void CompleteRunningQuests(List<GameObj> q)
        {



            for (int i = 0; i < q.Count; i++)
            {

                Active.RunningQuests.Remove(q[i]);
                CompleteQuest(q[i]);


            }

        }

        public static void CompleteQuest(GameObj q)
        {

         

        }

   
        public static void DoEvents(EventType e, GameObj[] a)
        {
            List<GameObj> ql = null;
       
        }

        // Use this for initialization
        void Start()
        {
            Active = this;
       
        }

        public void GeneratePaths()
        {

     

        }

        private void GeneratePointJunctions(GameObj p)
        {

        
        }
       
        public bool PointVisible(GameObj f, GameObj t)
        {

        
            return true;

        }

        public void NextPoint(GameObj f, GameObj t, List<GameObj> pl, List<GameObj> ex)
        {

        
        }

        public void StartCine(string name, bool useCineCam)
        {

        
        }
      
        public void RunPacket(GameObj p)
        {
          

        }

        public bool CheckCondition(GameObj c)
        {

            return false;

        }
        void OnGUI()
        {

        }

        public void UpdateCine()
        {
         
        }

        private void UpdateEditors()
        {
       
        }

        bool startedup = false;
        // Update is called once per frame
        void Update()
        {
            

           
           // UpdateEditors();
            UpdateCine();

            bool li = LockInput;
            bool found = false;
            
        }
    }
}